<input id="${id}" name="${name}" placeholder="${placeholder}" type="text" class="layui-input" autocomplete="off"
${readonly!''}
/>

<script>
    layui.use('laydate', function () {
        var laydate = layui.laydate;
        laydate.render({
            elem: "#${id}",
            format: "${format!'yyyy-MM-dd'}",
        });
    });

</script>